
package jpoco.client;

public class Organization implements java.io.Serializable
{
	public static final String TYPE_JOB = "job";
	public static final String TYPE_SCHOOL = "school";
	
	private String name;
	private String department;
	private String title;
	private String type;
	private String startDate;
	private String endDate;
	private String location;
	private String description;
	private boolean primary = false;
	
	public Organization()
	{
		super();
	}

	public String getName()
	{
		return name;
	}

	public void setName(String n)
	{
		this.name = n;
	}

	public String getDepartment()
	{
		return department;
	}

	public void setDepartment(String d)
	{
		this.department = d;
	}

	public String getTitle()
	{
		return title;
	}

	public void setTitle(String t)
	{
		this.title = t;
	}

	public String getType()
	{
		return type;
	}

	public void setType(String t)
	{
		this.type = t;
	}

	public String getStartDate()
	{
		return startDate;
	}

	public void setStartDate(String d)
	{
		this.startDate = d;
	}

	public String getEndDate()
	{
		return endDate;
	}

	public void setEndDate(String d)
	{
		this.endDate = d;
	}

	public String getLocation()
	{
		return location;
	}

	public void setLocation(String loc)
	{
		this.location = loc;
	}

	public String getDescription()
	{
		return description;
	}

	public void setDescription(String d)
	{
		this.description = d;
	}
	
	
	public boolean isSchool()
	{
		return TYPE_SCHOOL.equalsIgnoreCase(this.getType());
	}
	
	public boolean isJob()
	{
		return TYPE_JOB.equalsIgnoreCase(this.getType());
	}

	public boolean isPrimary()
	{
		return primary;
	}

	public void setPrimary(boolean b)
	{
		this.primary = b;
	}

	
	public String toString()
	{
		return this.getName();
	}
}
